fix(table): Use ansi.Truncate instead of runewidth.Truncate#883
fix(table): Use ansi.Truncate instead of runewidth.Truncate#883jedevc wants to merge 1 commit intocharmbracelet:masterfrom
Conversation
runewidth.Truncate does not consider terminal escape characters - this means that if a table cell contains funky characters, then it will be incorrectly truncated. Signed-off-by: Justin Chadwell <me@jedevc.com>
|
Hi @jedevc, and thanks for contributing! We're avoiding making changes on the I suggest you to try the release candidate to see if the issue persists there, and if so you're free to open another PR targeting that branch. |
|
I can check and reopen for sure 🎉 sorry, hadn't noticed you were doing prep for v2! I did see this comment charmbracelet/bubbletea#1374 (reply in thread) in the main bubbletea repo that mentioned how fixes could be applied across main and v2 branches? Not sure if that's the same scheme as here (or if that's changed), or when v2 is targeted for, but I'm using bubbletea quite extensively, and can't easily update to the rc fully, at least until it's all fully stable. |
|
@jedevc At this point, we don't expect any more breaking changes before launch. 🙂 |
runewidth.Truncatedoes not consider terminal escape characters - this means that if a table cell contains funky characters, then it will be incorrectly truncated.CONTRIBUTING.md.Minimal reproducer:
Before:
After: